package com.ego.product.po;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import com.ego.product.vo.BrandVo;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @program: ego
 * @description 品牌
 * @author KamTang
 * @date 2022-11-13 12:56:14
 */
@Data
@TableName("pms_brand")
public class Brand implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 品牌id
	 */
	@TableId
	private Long brandId;

	/**
	 * 品牌名
	 */
	@NotBlank
	private String name;

	/**
	 * 品牌logo地址
	 */
	@NotEmpty
	@URL
	private String logo;

	/**
	 * 介绍
	 */
	private String description;

	/**
	 * 显示状态[0-不显示；1-显示]
	 */
	@NotNull
	private Integer showStatus;

	/**
	 * 检索首字母
	 */
	@NotEmpty
	private String firstLetter;

	/**
	 * 排序
	 */
	@NotNull
	private Integer sort;

	public BrandVo toVo() {
		BrandVo vo = new BrandVo();
		vo.setBrandId(this.brandId);
		vo.setBrandName(this.name);
		return vo;
	}
}
